/**
 * @file setting_brightness.h
 *
 */
#ifndef SETTING_BRIGHTNESS_H
#define SETTING_BRIGHTNESS_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#if USE_LV_WATCH_SETTING_BRIGHTNESS != 0

/*********************
 *      DEFINES
 *********************/
typedef struct {
    uint8_t backlightintensity;                             // backlight intensity level
    uint8_t backlighttimeout;                               // backlight timeout value
} setting_brightness_t;
/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Create a setting brightness application
 */
lv_obj_t * setting_brightness_create(lv_obj_t * activiry_obj);
lv_obj_t * setting_brightness_bar_content_create(lv_obj_t * par);
lv_obj_t * setting_brightness_button_content_create(lv_obj_t * par);
void setting_brightness_create_btn_action(lv_obj_t * btn, lv_event_t event);
void setting_brightness_decrease_btn_action(lv_obj_t * btn, lv_event_t event);
void setting_brightness_increase_btn_action(lv_obj_t * btn, lv_event_t event);
void setting_brightness_prepare_destory(lv_obj_t * activity_obj);
extern void setting_brightness_init(nv_watch_settings_t *nvsettings);
extern uint8_t setting_get_backlight_timeout(void);
extern setting_brightness_t settingbrightness;              // for setting brightness management
/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_SETTING_BRIGHTNESS*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*SETTING_BRIGHTNESS_H*/
